$(function (){
    $("#back").on('click',function (){
        history.back();
    })


    $("#userCode").on("blur",function (){
        $.ajax({
            type:"GET",
            url:"http://localhost:8080/user/userIsExist/"+$("#userCode").val(),
            dataType:"JSON",
            success:function (data){
                if (data.code=='10000'){
                    $("#tishi").text(data.msg)
                }else {
                    $("#tishi").text(data.msg)
                }
            }
        })
    })
    $("#billCode").on("blur",function (){
        $.ajax({
            type:"GET",
            url:"http://localhost:8080/bill/billIsExist/"+$("#billCode").val(),
            dataType:"JSON",
            success:function (data){
                if (data.code=='10000'){
                    $("#tishi").text(data.msg)
                }else {
                    $("#tishi").text(data.msg)
                }
            }
        })
    })
    $("#proCode").on("blur",function (){
        $.ajax({
            type:"GET",
            url:"http://localhost:8080/pro/proIsExist/"+$("#proCode").val(),
            dataType:"JSON",
            success:function (data){
                if (data.code=='10000'){
                    $("#tishi").text(data.msg)
                }else {
                    $("#tishi").text(data.msg)
                }
            }
        })
    })
    $("#postCode").on("blur",function (){
        $.ajax({
            type:"GET",
            url:"http://localhost:8080/address/addressIsExist/"+$("#postCode").val(),
            dataType:"JSON",
            success:function (data){
                if (data.code=='10000'){
                    $("#tishi").text(data.msg)
                }else {
                    $("#tishi").text(data.msg)
                }
            }
        })
    })
})